<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>农污处理系统远程监测及运维管理平台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/admin.css" media="all">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/public.css" media="all">
    <link rel="shortcut icon" href="<%=request.getContextPath()%>/huazhi/images/favicon.ico"/>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/way/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/tubiao/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/extension/way/iconfont.css">
    <script src="<%=request.getContextPath()%>/huazhi/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>
    <script src="<%=request.getContextPath()%>/huazhi/js/jquery.SuperSlide.2.1.3.js"></script>
    <style>
        /*.pss{*/
        /*    padding-top: 4px;*/
        /*}*/
        /* 数据概览 */
        .layadmin-dataview {
            height: 332px !important;
        }

        .layadmin-dataview > *[carousel-item]:before {
            display: none;
        }

        .layadmin-dataview > *[carousel-item] > div {
            height: 332px;
        }

        .layui-card {
            border: 1px solid #f2f2f2;
            border-radius: 5px;
        }


        .layuimini-qiuck-module a i {
            display: inline-block;
            width: 100%;
            height: 60px;
            line-height: 60px;
            text-align: center;
            border-radius: 2px;
            font-size: 30px;
            background-color: #F8F8F8;
            color: #333;
            transition: all .3s;
            -webkit-transition: all .3s;
        }

        .layuimini-qiuck-module a cite {
            position: relative;
            top: 2px;
            display: block;
            color: #666;
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
            font-size: 14px;
        }

        .txtMarquee-top {
            /*width: 450px;*/
            overflow: hidden;
            position: relative;
            /*border: 1px solid #ccc;*/
        }

        .txtMarquee-top .hd {
            overflow: hidden;
            height: 30px;
            background: #f4f4f4;
            padding: 0 10px;
        }

        .txtMarquee-top .hd .prev, .txtMarquee-top .hd .next {
            display: block;
            width: 9px;
            height: 5px;
            float: right;
            margin-right: 5px;
            margin-top: 10px;
            overflow: hidden;
            cursor: pointer;
            background: url("<%=request.getContextPath()%>/huazhi/images/arrow.png") no-repeat;
        }

        .txtMarquee-top .hd .next {
            background-position: 0 -140px;
        }

        .txtMarquee-top .hd .prevStop {
            background-position: -60px -100px;
        }

        .txtMarquee-top .hd .nextStop {
            background-position: -60px -140px;
        }

        /*.txtMarquee-top .bd {*/
        /*    padding: 15px;*/
        /*}*/

        .txtMarquee-top .infoList li {
            height: 24px;
            line-height: 24px;
        }

        .txtMarquee-top .infoList li .date {
            float: right;
            color: #999;
        }


        .amap-marker-label {

            z-index: 2;
            border: 1px solid #ccc;
            white-space: nowrap;
            cursor: default;
            padding: 3px;
            font-size: 10px;
            line-height: 12px;

        }

        .border-box {
            position: relative;
            width: 100%;
            height: 380px;
            background-color: transparent;
            border: 1px solid #829bea;
            border-radius: 2px;
        }

        .border-box::before {
            position: absolute;
            top: -1px;
            bottom: -1px;
            left: 10px;
            width: calc(100% - 20px);
            content: "";
            border-top: 1px solid #829bea;
            border-bottom: 1px solid #829bea;
            z-index: 0;
        }


    </style>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-card-body" id="hiedId">
            <div style="width: 500px; overflow: hidden; position: absolute;top: 40px;z-index: 999;left: 1200px; "
                 class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade"
                 lay-filter="LAY-index-normcol">
                <table class="layui-table" lay-skin="line">
                    <colgroup>
                        <col width="150">
                        <col width="200">
                        <col>
                    </colgroup>
                    <thead>
                    <tr>
                        <th style="width: 40%;text-align: center">原因</th>
                        <th style="width: 40%; text-align: center">村名</th>
                        <th style="width: 18%;text-align: right"><a href="#" onclick="hideTable()">=></a></th>
                        <th style="width: 2%;"></th>
                    </tr>
                    </thead>
                </table>
                <div class="txtMarquee-top">
                    <div class="bd">
                        <ul class="infoList" id="bigUl"></ul>
                    </div>
                </div>
            </div>
        </div>
        <button id="biaoshou" onclick="xianshi()" type="button"
                style="display: block; position: absolute; z-index: 99;width: 57px;right: 0px;top: 50px;"
                class="layui-btn layui-btn-normal layui-btn-sm">显示
        </button>
        <div class="layui-col-md12">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card" style="margin-left: -30px;margin-right: -30px;margin-top: -30px;">
                        <div class="layui-card-header">五指山污水站分布图
                            <a onclick="getState(1)" href="#"><img  style="margin-left: 10px" src="<%=request.getContextPath()%>/huazhi/images/pointRed3.gif"><span>设备报警</span><span id="bjNum"></span></a>
                            <a onclick="getState(2)" href="#"><img  style="margin-left: 10px;height: 25px;" src="<%=request.getContextPath()%>/huazhi/images/pointDklj1.jpg"><span>采集器断开连接</span><span id="dkljNum"></span></a>
                            <a onclick="getState(3)" href="#">  <img  style="margin-left: 10px;height: 25px;" src="<%=request.getContextPath()%>/huazhi/images/pointNbyc1.jpg"><span>采集器内部异常</span><span id="nbycNum"></span></a>
<%--                            <a onclick="getState(4)" href="#"> <img  style="margin-left: 10px;height: 25px;" src="<%=request.getContextPath()%>/huazhi/images/pointSxt1.png"><span>摄像头</span><span id="sxtNum"></span></a>--%>
                            <a onclick="getState(0)" href="#"> <img  style="margin-left: 10px;height: 25px;" src="<%=request.getContextPath()%>/huazhi/images/pointZc1.png"><span>正常</span><span id="zcNum"></span></a>
                            <a href="javascript:;" onclick="opens()" class="layui-a-tips"> <i class="tubiao icon-fangda"></i> </a>
                            <div class="layui-inline" style="float: right;">
                                <div class="layui-input-inline">
                                    <input class="layui-input searchval" id="cunzi" type="text" placeholder="请输入村名">
                                </div>
                                <button class="layui-btn" id="search_btn" data-type="reload">搜索</button>
                                <button class="layui-btn layui-btn-primary" id="rest_btn" data-type="reload">重置</button>
                            </div>
                        </div>
                        <div class="layui-card-body">
                            <div id="container" style="height: 800px;"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/layui.all.js"></script>
<script src="<%=request.getContextPath()%>/huazhi/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>
<script src="<%=request.getContextPath()%>/huazhi/js/echarts/echarts.js"></script>

<script src="<%=request.getContextPath()%>/huazhi/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script src="<%=request.getContextPath()%>/huazhi/js/jquery.SuperSlide.2.1.3.js"></script>
<script type="text/javascript"
        src="https://webapi.amap.com/maps?v=1.4.12&key=b51f3248d9ad4e26ad1841c5a558f596"></script>
<script>

    layui.use(['layer', 'table'], function () {
        var $ = layui.$
            , table = layui.table
            , form = layui.form
            , layer = layui.layer
            , laypage = layui.laypage
            , ckplayer = layui.ckplayer;

        $("#flag").val("0");
        $.ajax({
            type: "get",
            url: "<%=request.getContextPath()%>/rest/base/getAlerts",
            dataType: "json",
            async: false,
            success: function (res) {
                var data = res.data;
            }
        });
        table.render({
            elem: '#videoTable'
            , url: '<%=request.getContextPath()%>/rest/smoke/getLinedSearch'
            , cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
            , height: 'full-900'
            , text: {
                none: '暂无相关数据' //默认：无数据。注：该属性为 layui 2.2.5 开始新增
            }
            , cols: [[
                {field: 'cun', title: '地点'}
                , {width: 100, title: '操作', toolbar: '#test-operation'}
            ]],
            where: {
                key: '',
            },
        });
        //搜索事件
        var active = {
            reload: function () {  //data-type='reload'
                var search = $('.search').val();
                table.reload('videoTable', { //表格的id
                    where: {
                        key: search,
                    },
                    text: {
                        none: '暂无相关数据' //默认：无数据。注：该属性为 layui 2.2.5 开始新增
                    }
                });
            }
        };
        //表格滚动开始
        startGunDongTable()

        $('#search_btn').on('click', function () { //搜索的id
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });
        table.on('tool(videoTables)', function (obj) {
            var data = obj.data;
            switch (obj.event) {
                case 'video':
                    var clocess = "1";
                    var index = layer.open({
                        title: data.cun + "实时监控",
                        type: 2,
                        content: '<%=request.getContextPath()%>/huazhi/js/lay-module/OpenCctv.jsp',
                        maxmin: true,
                        area: ['90%', '91%'],
                        //是否显示右上角关闭图标，默认为1，显示
                        anim: 4,
                        shade: 0.6,
                        skin: 'layui-layer-molv',
                        resize: true,
                        cancel: function (index, layero) {
                            layer.close(index)
                            clocess = "2"
                            return false;
                        },
                        success: function (layero, index) {  //当你需要在层创建完毕时即执行一些语句，可以通过该回调 想相当于吧值转到子界面
                            // var body = layer.getChildFrame('body', index);//建立父子联系  //当你试图在当前页获取iframe页的DOM元素时，你可以用此方法。
                            var iframe = window['layui-layer-iframe' + index];
                            iframe.child(data.videotid, data.videoUrl);
                        },
                        end: function () {
                            if (clocess !== "2") {
                                table.reload('videoTable')
                            }
                            return false;
                        }
                    });
                    break;
            }
        });
        $(document).on("click", "#search_btn", function () {
            var cun = document.getElementById("cunzi").value
            if (cun == "") {
                alert("请输入村名")
            } else {
                var map = new AMap.Map('container', {
                    resizeEnable: true,
                    center: [109.509597, 18.773616],//设置地图中心点坐标
                    zoom: 11, //设置地图显示的缩放级别
                    viewMode: '2D',  //设置地图模式
                    lang: 'zh_cn',  //设置地图语言类型

                });
                addCloudLayer(map,cun)
            }
        })

        //重置按钮事件
        $(document).on("click", "#rest_btn", function () {
            document.getElementById("cunzi").value = '';
            var map = new AMap.Map('container', {
                resizeEnable: true,
                center: [109.509597, 18.773616],//设置地图中心点坐标
                zoom: 11, //设置地图显示的缩放级别
                viewMode: '2D',  //设置地图模式
                lang: 'zh_cn',  //设置地图语言类型

            });
            addCloudLayer(map,"no")
        })



    });

    function getState(state){
        var map = new AMap.Map('container', {
            resizeEnable: true,
            center: [109.509597, 18.773616],//设置地图中心点坐标
            zoom: 11, //设置地图显示的缩放级别
            viewMode: '2D',  //设置地图模式
            lang: 'zh_cn',  //设置地图语言类型

        });
        addCloudLayer(map,state)
    }


    function way() {
        layer.msg('当前用户没有访问权限,请联系管理人员', {time: 1000, shade: 0});
    }

    $(function () {
        var map = new AMap.Map('container', {
            resizeEnable: true,
            center: [109.509597, 18.773616],//设置地图中心点坐标
            zoom: 11, //设置地图显示的缩放级别
            viewMode: '2D',  //设置地图模式
            lang: 'zh_cn',  //设置地图语言类型

        });

        window.setTimeout(function () {
            addCloudLayer(map,'no')
        }, 100)
    })

    var markers = []
    window.alert = function(msg, callback) {
        var div = document.createElement("div");
        div.innerHTML = "<style type=\"text/css\">"
            + ".nbaMask { position: fixed; z-index: 1000; top: 0; right: 0; left: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); }                                                                                                                                                                       "
            + ".nbaMaskTransparent { position: fixed; z-index: 1000; top: 0; right: 0; left: 0; bottom: 0; }                                                                                                                                                                                            "
            + ".nbaDialog { position: fixed; z-index: 5000; width: 80%; max-width: 300px; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); background-color: #fff; text-align: center; border-radius: 8px; overflow: hidden; opacity: 1; color: white; }"
            + ".nbaDialog .nbaDialogHd { padding: .2rem .27rem .08rem .27rem; }                                                                                                                                                                                                                         "
            + ".nbaDialog .nbaDialogHd .nbaDialogTitle { font-size: 17px; font-weight: 400; }                                                                                                                                                                                                           "
            + ".nbaDialog .nbaDialogBd { padding: 0 .27rem; font-size: 15px; line-height: 1.3; word-wrap: break-word; word-break: break-all; color: #000000; }                                                                                                                                          "
            + ".nbaDialog .nbaDialogFt { position: relative; line-height: 48px; font-size: 17px; display: -webkit-box; display: -webkit-flex; display: flex; }                                                                                                                                          "
            + ".nbaDialog .nbaDialogFt:after { content: \" \"; position: absolute; left: 0; top: 0; right: 0; height: 1px; border-top: 1px solid #e6e6e6; color: #e6e6e6; -webkit-transform-origin: 0 0; transform-origin: 0 0; -webkit-transform: scaleY(0.5); transform: scaleY(0.5); }               "
            + ".nbaDialog .nbaDialogBtn { display: block; -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; color: #09BB07; text-decoration: none; -webkit-tap-highlight-color: transparent; position: relative; margin-bottom: 0; }                                                                       "
            + ".nbaDialog .nbaDialogBtn:after { content: \" \"; position: absolute; left: 0; top: 0; width: 1px; bottom: 0; border-left: 1px solid #e6e6e6; color: #e6e6e6; -webkit-transform-origin: 0 0; transform-origin: 0 0; -webkit-transform: scaleX(0.5); transform: scaleX(0.5); }             "
            + ".nbaDialog a { text-decoration: none; -webkit-tap-highlight-color: transparent; }"
            + "</style>"
            + "<div id=\"dialogs2\" style=\"display: none\">"
            + "<div class=\"nbaMask\"></div>"
            + "<div class=\"nbaDialog\">"
            + "    <div class=\"nbaDialogHd\">"
            + "        <strong class=\"nbaDialogTitle\"></strong>"
            + "    </div>"
            + "    <div class=\"nbaDialogBd\" id=\"dialog_msg2\">弹窗内容，告知当前状态、信息和解决方法，描述文字尽量控制在三行内</div>"
            + "    <div class=\"nbaDialogHd\">"
            + "        <strong class=\"nbaDialogTitle\"></strong>"
            + "    </div>"
            + "    <div class=\"nbaDialogFt\">"
            + "        <a href=\"javascript:;\" class=\"nbaDialogBtn nbaDialogBtnPrimary\" id=\"dialog_ok2\">确定</a>"
            + "    </div></div></div>";
        document.body.appendChild(div);

        var dialogs2 = document.getElementById("dialogs2");
        dialogs2.style.display = 'block';

        var dialog_msg2 = document.getElementById("dialog_msg2");
        dialog_msg2.innerHTML = msg;

        // var dialog_cancel = document.getElementById("dialog_cancel");
        // dialog_cancel.onclick = function() {
        // dialogs2.style.display = 'none';
        // };
        var dialog_ok2 = document.getElementById("dialog_ok2");
        dialog_ok2.onclick = function() {
            dialogs2.style.display = 'none';
            callback();
        };
    };

    function addCloudLayer(map,name) {
        var bjNumber = 0
        var dkljNumber = 0
        var nbycNumber = 0
        var zcNumber  = 0
        var sxtNumber = 0
        $.ajax({
            type: "post",
            url: "<%=request.getContextPath()%>/rest/smoke/getLinedAll",
            dataType: "json",
            data: "cun=" + name,
            async: false,
            success: function (res) {
                console.log(res)
                if (res.data != null) {
                    var Lineds = res.data
                    for (var i = 0; i < Lineds.length; i++) {
                        var oneLined = Lineds[i]
                        var redOrGreen = ''
                        if (oneLined.state == 1) {
                            redOrGreen = 'Red3.gif'
                            bjNumber +=1;
                        } else if (oneLined.state == 2) {
                            redOrGreen = 'Dklj1.jpg'
                            dkljNumber+=1;
                        } else if (oneLined.state == 3) {
                            redOrGreen = 'Nbyc1.jpg'
                            nbycNumber+=1;
                        }
                        else  if(oneLined.state == 4){
                            continue;
                            // redOrGreen = 'Sxt1.png'
                            // sxtNumber+=1
                        }
                        else {
                            redOrGreen = 'Zc1.png'
                            zcNumber+=1;
                        }
                        var oneMaker = new AMap.Marker({
                            icon: "<%=request.getContextPath()%>/huazhi/images/point" + redOrGreen,
                            map: map,
                            position: [oneLined.jingdu, oneLined.weidu],
                            clickable: true,
                        });
                        // 设置label标签
                        // label默认蓝框白底左上角显示，样式className为：amap-marker-label
                        oneMaker.setLabel({
                            offset: new AMap.Pixel(0, 0),  //设置文本标注偏移量
                            content: "<div class='info'>" + oneLined.cun + "</div>", //设置文本标注内容
                            direction: 'bottom' //设置文本标注方位
                        });
                        Lineds[i].para = oneMaker
                        markers.push(oneMaker);
                        Lineds[i].para.setMap(map);
                        Lineds[i].para.setExtData({
                            url: Lineds[i].videoUrl,
                            sericl: Lineds[i].videotid,
                            cun: Lineds[i].cun,
                            linedTid: Lineds[i].tid,
                            reason: Lineds[i].reason,
                            number: Lineds[i].number,
                            sequence: i
                        });
                        var _onClick = function (e) {
                            var ext = e.target.getExtData()
                            getLineBycun(ext.cun, ext.reason,ext.number);
                        }
                        AMap.event.addListener(oneMaker, 'click', _onClick);
                    }
                }
                giveNumber();

            }
        })

        function giveNumber(){
          document.getElementById("bjNum").innerText = "--"+bjNumber+"个";
          document.getElementById("nbycNum").innerText = "--"+nbycNumber+"个";
          document.getElementById("dkljNum").innerText = "--"+dkljNumber+"个";
          document.getElementById("zcNum").innerText = "--"+zcNumber+"个";
          document.getElementById("sxtNum").innerText = "--"+sxtNumber+"个";
        }
    }

    function  startGunDongTable(){
        $.ajax({
            type: "get",
            url: "<%=request.getContextPath()%>/rest/base/getAllAlertNo",
            dataType: "json",
            async: false,
            success: function (res) {
                var showData = res;
                var ul = '';
                var sum = 0;
                for (var i=0; i<showData.length; i++) {
                    var oneData = showData[i];
                    sum++;
                    var cun = "'" + oneData.weidu+ ""+ "'"
                    var msg = "'" + oneData.reason+"" + "'"
                    ul += '<li><div style="margin-top: 10px" class="layui-col-md6" >';
                    ul += '<span style="line-height: 20px;font-size: 13px;min-height: 20px; margin-left: 10px">' + oneData.reason + '</span></div>';
                    ul += '<div style="margin-top: 10px" class="layui-col-md4" ">';
                    ul += '<span style="line-height: 20px;font-size: 13px;min-height: 20px; margin-left: 10px">' + oneData.weidu + '</span></div>';
                    ul += '<div style="margin-top: 10px" class="layui-col-md2">';
                    ul += '<button  onclick="details(' + cun + ',' + msg + ')" type="button" class="layui-btn layui-btn-normal layui-btn-sm">查看</button></div></li>'

                }
                $('#bigUl').html(ul)
                jQuery(".txtMarquee-top").slide({
                    mainCell: ".bd ul",
                    autoPlay: true,
                    effect: "topMarquee",
                    interTime: 20000,
                });
                gundong();
            }

        });
    }


    function opens() {
        layer.open({
            title: "污水处理点分布地图 ",
            type: 2,
            area: ['100%', '100%'],
            content: '<%=request.getContextPath()%>/rest/getRoute?type=home&url=map',
            shade: 0.6,
            anim: 4,
            skin: 'layui-layer-molv',
            resize: true,
            move: false,
            maxmin: true,
            success: function (layero, index) {  //当你需要在层创建完毕时即执行一些语句，可以通过该回调 想相当于吧值转到子界面

            }
        });
        $('.layui-layer-setwin .layui-layer-max').css("display", "none")
        $('.layui-layer-setwin .layui-layer-min').css("display", "none")

    }

    function hideTable() {
        document.getElementById("hiedId").style.display = 'none'
    }

    function xianshi() {
        document.getElementById("hiedId").style.display = "block"
    }

    function getLineBycun(cun, reason,number) {
        if(number.indexOf("DSG4RV1")!= -1){
            $.ajax({
                type: "get",
                url: "<%=request.getContextPath()%>/rest/smoke/getDdLinedByNumber",
                data: "number=" + number,
                dataType: "json",
                async: false,
                success: function (msg) {
                    if (msg == 0) {
                        alert("暂时没有该村信息")
                    } else {
                        msg.reason = reason
                        details(msg)
                    }
                }
            })
        }else {
            $.ajax({
                type: "post",
                url: "<%=request.getContextPath()%>/rest/base/getLineByCunzi",
                data: "cun=" + cun,
                dataType: "json",
                async: false,
                success: function (msg) {
                    if (msg == 0) {
                        alert("暂时没有该村信息")
                    } else {
                        msg.reason = reason
                        details(msg)
                    }
                }
            })
        }



    }

    function gundong() {
        var marginTop = 0;
        var bool = false;
        // 判断有多少个li
        var lengli = $("#bigUl li").length - 2;
        setInterval(function () {
            if (bool) return;//判断运行和停止
            $("#bigUl li:first").animate({marginTop: marginTop--}, 10, function () {
                if (!($(this).is(":animated"))) {    //判断是否有一个动画节点
                    if ((-marginTop) >= $(this).height() * lengli) {  //判断移出位置是否超过高度
                        $(this).css("margin", "0");
                        $(this).appendTo($(".text"));  //把第一个节点移到ul后面
                        marginTop = 0;      //重新设置移动数值
                    }
                }
            });
        }, 100);
        $("#bigUl").mouseover(function () {   //li鼠标移入，停止移动
            bool = true;
        });
        $("#bigUl").mouseout(function () {
            bool = false;
        });
    }


    function details(msg) {
        var videoUrl = msg.videoUrl
        var url = '/rest/getRoute?type=home&url=sewage_info'
        if(msg.number.indexOf("DSG4RV1") != -1){
            videoUrl = msg.videourl
            url ="/rest/getRoute?type=home&url=ddsewage_info"
        }
        layer.open({
            title: "实时监控-" + msg.cun,
            type: 2,
            area: ['100%', '100%'],
            content: '<%=request.getContextPath()%>'+url,
            shade: 0.8,
            anim: 4,
            skin: 'layui-layer-molv',
            resize: true,
            move: false,
            maxmin: true,
            success: function (layero, index) {  //当你需要在层创建完毕时即执行一些语句，可以通过该回调 想相当于吧值转到子界面
//                    var body = layer.getChildFrame('body',index);//建立父子联系  //当你试图在当前页获取iframe页的DOM元素时，你可以用此方法。
//                    alert(videoTid+" "+videoUrl)
//                    body.find("#videoTid").val(videoTid);
//                    body.find("#videoUrl").val(videoUrl);
                var iframe = window['layui-layer-iframe' + index];
                iframe.child(msg.videotid, videoUrl, msg.cun, 1, msg.reason,msg.number);

            }
        });


    }

</script>
</body>
</html>
